import java.util.Scanner;

public class ZhengZe {
    public static void main(String[] args) {
        String str = CreateString();
        //正则表达式
        System.out.println(str.matches("[abc][abc]"));
        System.out.println(str.matches("\\w{4,}"));
        System.out.println(str.matches("[abc]{2,}\\W+"));
    }

    public static String CreateString() {
        //还记得键盘录入怎么写吗？
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入录入:");
        String str = sc.nextLine();
        return str;
    }
}
